package com.xncoding.design.ZeRenLian.demo3;


import com.xncoding.design.ZeRenLian.demo2.RequestSource;

public class Cliect {
    public static void main(String[] args) {
        RequestSource requestSource = new RequestSource();
        requestSource.setHeader(1);
        requestSource.setBody(2);
        requestSource.setFooter(3);
        Handler handlerHeader = new HeaderHandler(null);
        Handler handlerbody = new BodyHandler(handlerHeader);
        Handler handlerfotter = new FooterHandler(handlerbody);
        handlerfotter.doHandler(requestSource);
    }
}
